<!--#include file=checkSession.inc-->
<%
view=trim(request("view"))
if Session("mailbox")="" then
	sSQL="Select mailbox, mailpassword  from canbo where username = '"& Session("Uname") &"'"
	Set Rec=server.CreateObject("ADODB.Recordset")
	Rec.CursorType=3
	Rec.CacheSize=5
	Rec.Open sSQL,Conn
	if Rec.recordcount then
		Session("mailpass")=Rec("mailpassword")
		Session("mailbox")=Rec("mailbox")
	end if
	Rec.close
	Set Rec=nothing
end if

	sSQL="Select WebMailAddress, WebMailPort From Config"
	Set Rec=server.CreateObject("ADODB.Recordset")
		Rec.CursorType=3
		Rec.CacheSize=5
		Rec.Open sSQL,Conn
	if Rec.recordcount then
		bWebMailAddress=Rec("WebMailAddress")
		bWebMailPort=Rec("WebMailPort")
	end if
	Rec.close
	Set Rec=nothing
	bstrURL=bWebMailAddress &":" & bWebMailPort
	
%>
<html>
<head>
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--
function load()
{
	//window.nhom.target="right";
	//window.nhom.submit();	
}
//-->
</SCRIPT>
<%=bstrURL%>
</head>
<body  topmargin="0" leftmargin="0" style="font-family:times new roman" onload="load()">
<form name="nhom" method="POST" action="<%=bstrURL%>">
	<input type="hidden" name="user" value="<%=Session("mailbox")%>">
	<input type="hidden" name="password" value="<%=Session("mailpass")%>">
	<input type="hidden" name="view" value="<%=view%>">
	<input type="hidden" name="new" value="yes">
</form>
</body>
</html>